<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class AdminUser extends Base
{
    public static function add($map)
    {
        $data['username'] = $map['username'];
        $data['password'] = md5($map['password']);

        $user = self::where('username',$data['username'])->get();
        if($user->isEmpty()){
            self::create($data);
            return 200;

        }else{
            return 1;
        }

    }
}
